import request from '@/utils/request'

export const getStrategyList = function(params) {
  return request({
    url: '/api/vm-service/policy/search',
    method: 'GET',
    params
  })
}

export const addStrategyList = function(data) {
  return request({
    url: '/api/vm-service/policy',
    method: 'POST',
    data
  })
}

export const removeStrategyList = function(id) {
  return request({
    url: '/api/vm-service/policy/' + id,
    method: 'DELETE'
  })
}

export const updataStrategyList = function(data) {
  return request({
    url: '/api/vm-service/policy/' + data.policyId,
    method: 'PUT',
    data
  })
}

export const searchDetailList = function(params) {
  return request({
    url: '/api/vm-service/policy/vmList/' + params.policyId,
    method: 'GET',
    params
  })
}
